package sample;

public class TestClass {


    public void test1() {
        System.out.println("test1 1");
        Fiber.yield();
        System.out.println("test1 2");
        Fiber.yield();
        System.out.println("test1 3");
        Fiber.yield();
        System.out.println("test1 4");
        Fiber.yield();
        System.out.println("test1 5");

    }


    public void test2() {
        int state = Fiber.state;
        if (state == 0) {
            System.out.println("test1 1");
            Fiber.nextState();
            return;
        }
        if (state == 1) {
            System.out.println("test1 2");
            Fiber.nextState();
            return;

        }
        if (state == 6) {
            System.out.println("test1 3");
            Fiber.nextState();

        }
    }


}
